package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishMapper {
    @AutoFill(OperationType.INSERT)
    Long addNewDish(Dish dish);

    List<DishVO> getAllDish(DishPageQueryDTO dishPageQueryDTO);

    @AutoFill(OperationType.UPDATE)
    void updateDish(Dish dish);

    DishVO getDishById(Long id);

    void deleteDishs(List<Integer> ids);

    List<Dish> getDishsByType(Long categoryId);


    List<Dish> list(Dish dish);
}
